refactor: MemberCategory 변환 및 Member 도메인 검증 로직 분리(#25)#26
Merged
chaiminwoo0223 merged 1 commit intodevelopfrom Jul 13, 2025
Merged
refactor: MemberCategory 변환 및 Member 도메인 검증 로직 분리(#25)#26chaiminwoo0223 merged 1 commit intodevelopfrom
chaiminwoo0223 merged 1 commit intodevelopfrom
Conversation
* refactor: MemberService에서 parseCategory, validateMemberNickname, validateNewMember 메서드 삭제 * refactor: MemberCategory에 from 정적 팩토리 메서드 구현 * refactor: member.domain.entity 패키지 -> model.domain.model 패키지 이름 변경 * feat: MemberPolicy 구현 * feat: MemberRepository에 existsBySocialProviderAndSocialId 메서드 구현 * feat: MemberErrorCode에 INVALID_MEMBER_CATEGORY 에러 메시지 추가 * test: shouldThrowExceptionWhenCategoryIsBlank 메서드 추가
hisonghy
approved these changes
Jul 13, 2025
Contributor
hisonghy
left a comment
There was a problem hiding this comment.
도메인 정책을 domain.policy 클래스로 분리해 검증을 수행하고, 멤버 카테고리 변환 로직을 도메인 enum 모델 클래스 내부에 구성하면서 도메인 중심의 객체 책임과 역할이 명확해지고 응집도가 더욱 높아진 것 같아요.
고생하셨습니다 머지 부탁드려요
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 작업 내용 및 특이사항
MemberService내부 로직을 정리하고, 역할 분리를 통해 응집도 향상MemberCategory에 문자열 입력을 안전하게 변환하는from정적 메서드 구현MemberPolicy를 도입하여 신규 멤버 유효성 검증 로직 분리MemberErrorCode에 INVALID_MEMBER_CATEGORY 메시지 추가member.domain.entity→member.domain.modelMemberServiceTest에 shouldThrowExceptionWhenCategoryIsInvalid 메서드 삭제MemberServiceTest에 shouldThrowExceptionWhenCategoryIsBlank 메서드 추가🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)